//q6.cpp
//This program takes 7 characters, print them as a triangle and print their ascii values
//
//Binyamin 7 december 2017
//=====================================================================================

#include <iostream>

using namespace std;

//1. prompt the user for 7 characters.
//2. Store the characters to varibales;
//3. print them in triangle form.
//4. print their ASCII values

int main()
{
	// Preperation
	char ch0, ch1, ch2, ch3, ch4, ch5, ch6; // ch* - used to store the chars from 0 to 6
	cout << "Please enter 7 characters:" << endl;
	cin >> ch0 >> ch1 >> ch2 >> ch3 >> ch4 >> ch5 >> ch6;
	
	//Printing the triangle
	cout << ch0 << ch1 << ch2 << ch3 << endl \
		<< " " << ch4 << ch5 << endl \
		<< "  " << ch6 << endl;

	//Printing ASCII values
	cout << +ch0 << " " << +ch1 << " " << +ch2 << " " << +ch3 << " " << +ch4 << " " << +ch5 << " " << +ch6 << endl;
	return 0;
}
//output
//Please enter 7 characters: a b c d e f g
//abcd
// ef
//  g
//97 98 99 100 101 102 103
